Checked.opAssign

Assignment operator. Has the same constraints as the constructor.

struct Checked(T, Hook = Abort)
void
opAssign
(
U
)
(
U rhs
)
if (
is(typeof(Checked!(T, Hook)(rhs)))
)
if (
isIntegral!T ||
is(T == Checked!(U, H),
U
H
)
)

Examples

1 Checked!long a;
2 a = 42L;
3 assert(a == 42);
4 a = 4242;
5 assert(a == 4242);

Meta